<script setup lang='ts'>
defineProps({
  loading: Boolean,
  total: Number,
  hidePager: Boolean,
})
const tableTextAlign = toRef(inject('tableTextAlign'))
const size = defineModel('size', { type: Number, default: 20 })
const page = defineModel('page', { type: Number, default: 1 })
const cellStyle: any = computed(() => ({ textAlign: tableTextAlign.value, padding: '6px 0', color: '#505050' }))
const headerCellStyle: any = computed(() => ({ textAlign: tableTextAlign.value, padding: '8px 0', color: '#505050', background: '#f5f7fa' }))
</script>

<template>
  <el-table
    v-loading="loading"
    v-bind="$attrs"
    stripe
    :header-cell-style="headerCellStyle"
    :cell-style="cellStyle"
  >
    <template v-for="(value, name) in $slots" #[name]>
      <slot :name="name" />
    </template>
  </el-table>

  <!-- <div v-if="!hidePager" class="sticky bottom-0 z-99 w-full bg-white">
    <Pagination

      v-model:page-size="size"
      v-model:current-page="page"
      :total="total"
    />
  </div> -->
</template>

<style scoped lang='scss'>

</style>
